package com.campusbackend.entity.vo;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.NotEmpty;

import java.util.List;

/**
 * 学生注册请求数据对象
 */
@Getter
@Setter
@ToString
@Data
public class StudentRegisterVO {
    
    @NotBlank(message = "学号不能为空")
    @Pattern(regexp = "^\\S{1,50}$", message = "学号长度必须在1-50个字符之间，且不能包含空格")
    private String studentId;
    
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^\\S{6,255}$", message = "密码长度必须在6-255个字符之间，且不能包含空格")
    private String password;
    
    @NotBlank(message = "确认密码不能为空")
    private String confirmPassword;
    
    @NotBlank(message = "真实姓名不能为空")
    @Pattern(regexp = "^\\S{1,100}$", message = "姓名长度必须在1-100个字符之间")
    private String realName;
    
    @NotNull(message = "年龄不能为空")
    @Min(value = 16, message = "年龄不能小于16岁")
    @Max(value = 100, message = "年龄不能大于100岁")
    private Integer age;
    
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "请输入正确的邮箱格式")
    private String email;
    
    @NotBlank(message = "学院不能为空")
    @Pattern(regexp = "^\\S{1,100}$", message = "学院名称长度必须在1-100个字符之间")
    private String college;
    
    @NotEmpty(message = "技能特长不能为空，请至少选择一项技能")
    private List<Long> skillIds;
}
